﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="/favicon.ico" >
<LINK rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<link href="skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>优家好物-后台管理</title>
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body>
<header class="Hui-header cl"> <a class="Hui-logo l" title="后台管理" href="/Manage/">后台管理</a> <a class="Hui-logo-m l" href="/" title="后台管理">优家好物商城</a> <span class="Hui-subtitle l"></span>
	<!-- <nav class="mainnav cl" id="Hui-nav">
		<ul>
			<li class="dropDown dropDown_click"><a href="javascript:;" aria-expanded="true" aria-haspopup="true" data-toggle="dropdown" class="dropDown_A"><i class="icon Hui-iconfont">&#xe600;</i> 新增 <i class="icon Hui-iconfont">&#xe6d5;</i></a>
				<ul class="dropDown-menu radius box-shadow">
					<li><a href="javascript:;" onclick="article_add('添加资讯','article-add.html')"><i class="icon Hui-iconfont">&#xe616;</i> 资讯</a></li>
					
					<li><a href="javascript:;" onclick="product_add('添加资讯','product-add.html')"><i class="icon Hui-iconfont">&#xe620;</i> 产品</a></li>
					<li><a href="javascript:;" onclick="member_add('添加用户','member-add.html','','510')"><i class="icon Hui-iconfont">&#xe60d;</i> 用户</a></li>
				</ul>
			</li>
		</ul>
	</nav> -->
	<ul class="Hui-userbar">
		<li id="logininfo"></li>
		<li id="jibie"></li>
		<li class="dropDown dropDown_hover"><a href="#" class="dropDown_A" id="webname"><span></span> <i class="icon Hui-iconfont">&#xe6d5;</i></a>
			<ul class="dropDown-menu radius box-shadow">
				<li id="admin-info-href"><a href="javascript:;">修改密码</a></li>
				<!-- <li><a href="#">切换账户</a></li> -->
				<li><a href="javascript:;" onclick="loginout();">退出</a></li>
			</ul>
		</li>
		<li _href="system-clearcookies.html" href="system-clearcookies.html" data-title="清除缓存" id="clearcookies" style="cursor: pointer;">清除缓存</li>
		
		<!-- <li id="admin_notice"> <a href="#" title="消息"><span class="badge badge-danger" style="display: none;">0</span><i class="Hui-iconfont" style="font-size:18px">&#xe68a;</i></a> </li> -->

		<!-- <li class="dropDown dropDown_hover indexnotice" id="admin_notice"><a href="#" title="消息" id="admin_clear"><i class="Hui-iconfont" style="font-size:18px">&#xe68a;</i><span class="badge badge-danger" id="notice_num" style="display: none;">0</span></a>
			<ul class="dropDown-menu radius box-shadow">
				<li id="notice_apply"><a _href="apply-list.html" data-title="申请管理" href="javascript:void(0)" style="padding-left: 10px;">申请管理<span>( 0 )</span></a></li>
				<li id="notice_order"><a _href="order-list.html" data-title="订单管理" href="javascript:void(0)" style="padding-left: 10px;">订单管理<span>( 0 )</span></a></li>
			</ul>
		</li> -->



		<!-- <li id="Hui-skin" class="dropDown right dropDown_hover"><a href="javascript:;" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
			<ul class="dropDown-menu radius box-shadow">
				<li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
				<li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
				<li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
				<li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
				<li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
				<li><a href="javascript:;" data-val="orange" title="绿色">橙色</a></li>
			</ul>
		</li> -->
	</ul>
	<a href="javascript:;" class="Hui-nav-toggle Hui-iconfont" aria-hidden="false">&#xe667;</a> </header>

<aside class="Hui-aside" onmouseover="shownavbar(this)">
	<input runat="server" id="divScrollValue" type="hidden" value="" />
	<div class="menu_dropdown bk_2">
		


		
		<dl id="menu-order">
			<dt><i class="icon Hui-iconfont">&#xe687;</i> 订单管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>
					<li><a _href="order-list.html" data-title="订单管理" href="javascript:void(0)">订单管理</a></li>
					<li><a _href="order-print-list.html" data-title="订单打印管理" href="javascript:void(0)">订单打印</a></li>
					<!-- <li><a _href="order-transport-list.html" data-title="订单售后" href="javascript:void(0)">订单售后</a></li> -->
				</ul>
			</dd>
		</dl>

		<dl id="menu-product">
			<dt><i class="icon Hui-iconfont">&#xe620;</i> 商品管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>
					<li><a _href="product-list.html" data-title="商品管理" href="javascript:void(0)">商品管理</a></li>
					<li><a _href="evaluate-list.html" data-title="商品评论" href="javascript:void(0)">商品评论</a></li>
					<li><a _href="product-category.html" data-title="产品分类" href="javascript:void(0)">分类管理</a></li>
					<!-- <li><a _href="avatar-add.html" data-title="虚拟头像上传" href="javascript:void(0)">虚拟头像上传</a></li> -->
					<!-- <li><a _href="evaluate-addgroup.html" data-title="批量添加评论" href="javascript:void(0)">批量添加评论</a></li> -->
				</ul>
			</dd>
		</dl>

		<dl id="menu-shop">
			<dt>
				<a _href="shop-list.html" data-title="店铺管理" href="javascript:void(0)"><i class="icon Hui-iconfont">&#xe66a;</i> 店铺管理</a>
			</dt>
		</dl>
		<dl id="menu-count">
			<dt>
				<a _href="count-list.html" data-title="访问统计管理" href="javascript:void(0)"><i class="icon Hui-iconfont">&#xe61c;</i> 访问统计管理</a>
			</dt>
		</dl>
		<dl id="menu-supplier">
			<dt>
				<a _href="supplier-list.html" data-title="供应商管理" href="javascript:void(0)"><i class="icon Hui-iconfont">&#xe60a;</i> 供应商管理</a>
			</dt>
			
		</dl>
		<dl id="menu-ad">
			<dt>
				<a _href="ad-list.html" data-title="广告管理" href="javascript:void(0)"><i class="icon Hui-iconfont">&#xe685;</i> 广告管理</a>
			</dt>			
		</dl>
		<dl id="menu-search">
			<dt>
				<a _href="search-list.html" data-title="搜索管理" href="javascript:void(0)"><i class="icon Hui-iconfont">&#xe665;</i> 搜索管理</a>
			</dt>			
		</dl>
		
		<dl id="menu-circle">
			<dt>
				<a _href="article-list.html" data-title="文章管理" href="javascript:void(0)"><i class="icon Hui-iconfont">&#xe627;</i> 文章管理</a>
			</dt>			
		</dl>
		
<!-- 		<dl id="menu-circle">
			<dt><i class="icon Hui-iconfont">&#xe636;</i> 广告管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>
					<li><a _href="ad-list.html" data-title="广告位管理" href="javascript:void(0)">广告位管理</a></li>
					<li><a _href="ad-product-list.html" data-title="产品广告管理" href="javascript:void(0)">产品广告管理</a></li>
					<li><a _href="ad-order-list.html" data-title="广告订单管理" href="javascript:void(0)">广告订单管理</a></li>
				</ul>
			</dd>
		</dl> -->

		
		
<!-- 		<dl id="menu-circle">
			<dt>
				<a _href="feedback-list.html" data-title="意见反馈" href="javascript:void(0)"><i class="icon Hui-iconfont">&#xe692;</i> 意见反馈</a>
			</dt>
		</dl> -->
		
		<dl id="menu-member">
			<dt><i class="icon Hui-iconfont">&#xe60d;</i> 用户管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>
					<li><a _href="member-list.html" data-title="用户列表" href="javascript:;">用户列表</a></li>

					<!-- <li><a _href="getcash-list.html" data-title="提现管理" href="javascript:;">提现管理</a></li> -->
				</ul>
			</dd>
		</dl>
		<dl id="menu-admin">
			<dt><i class="icon Hui-iconfont">&#xe62d;</i> 管理员管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>
					<li><a _href="admin-role.html" data-title="权限组管理" href="javascript:void(0)">权限组管理</a></li>
					<li><a _href="admin-permission.html" data-title="权限管理" href="javascript:void(0)">权限管理</a></li>
					<li><a _href="admin-list.html" data-title="管理员列表" href="javascript:void(0)">管理员列表</a></li>
					<li><a _href="log-admin.html" data-title="管理日志" href="javascript:void(0)">管理日志</a></li>
				</ul>
			</dd>
		</dl>

	</div>
</aside>
<section class="Hui-article-box" onmouseover="hidenavbar(this)">
	<div id="Hui-tabNav" class="Hui-tabNav">
		<div class="Hui-tabNav-wp">
			<ul id="min_title_list" class="acrossTab cl">
				<li class="active"><span title="我的桌面" data-href="welcome.html">我的桌面</span><em></em></li>
			</ul>
		</div>
		<div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="icon Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="icon Hui-iconfont">&#xe6d7;</i></a></div>
	</div>
	<div id="iframe_box" class="Hui-article">
		<div class="show_iframe">
			<div style="display:none" class="loading"></div>
			<iframe scrolling="yes" frameborder="0" src="welcome.html" id="iframe" name="rightiframe"></iframe>
		</div>
	</div>
</section>


<script type="text/javascript">
var notice;//
var noticeflag=true;





// 获取消息
function getnotice(){
	var cookienum=getCookie("noticenews");
	if(typeof(cookienum) == "undefined"){
		cookienum=0;
	}
	cookienum=parseInt(cookienum);
	if (requesting) { 
		requesting++;
		if(requesting > 10)  requesting=0;
		console.log('正在请求中'+requesting);
		return 
	}
	requesting=1;

	$.getJSON(API_NOTICE,function(data){
		requesting=0;

		var nowNum=parseInt(data.datas.apply)+parseInt(data.datas.order);
		if(nowNum == 0 ) return;

		$("#notice_num").show();
		$("#notice_num").text(nowNum); 
		$("#notice_apply span").html("( "+data.datas.apply+" )");
		$("#notice_order span").html("( "+data.datas.order+" )");
		
		if(noticeflag){
			// console.log("yew");
			// 标题闪烁通知
			window.clearInterval(notice);
			notice=setInterval(function() {
			    var title = document.title;
			    if (/新/.test(title) == false) {
		            document.title = '【你有新消息】';  
		            // $("#notice_num").text(num);
		            $("#notice_num").show();  
		        } else {
		            document.title = '【　　　　　】';
		            // $("#notice_num").text("");  
		            $("#notice_num").hide();
		        }
			}, 500);
		}else{
			// console.log("no")
			if(nowNum>cookienum){
					// 标题闪烁通知
					window.clearInterval(notice);
					notice=setInterval(function() {
					    var title = document.title;
					    if (/新/.test(title) == false) {
				            document.title = '【你有新消息】';  
				            // $("#notice_num").text(num);
				            $("#notice_num").show();  
				        } else {
				            document.title = '【　　　　　】';
				            // $("#notice_num").text("");  
				            $("#notice_num").hide();
				        }
					}, 500);
			}
		}

		setCookie("noticenews", nowNum, 1440);
			
	})
}


var requesting=0;
// getnotice();

// setInterval(getnotice, 600000);

$(document).on('click','a#admin_clear',function(){
	$("#notice_num").show();	
	  
	window.clearInterval(notice);
	noticeflag=false;
	document.title = "优家好物";
	console.log(num);
})

/*管理员-编辑*/
function admin_edit(title,url,id,w,h){
	// layer_show(title,url,w,h);
	var index = layer.open({
		type: 2,
		title: title,
		content: url+"?editid="+id,
		area:[w,h],
	});
}

// 退出登录
function loginout(){
	layer.confirm('确认要退出？',function(index){
	    $.getJSON('/admin/Index/logout',function(data){
	    	if(!checkStatus(data)) return;

			if(data.status==1){
				window.parent.location.href=url_login;
			}
		})
	});
}


$.getJSON(API_ADMIN_INFO,function(data){
	if(!checkStatus(data)) return;
	$("#webname span").text(data.datas.admin_name);
	$("#jibie").text(data.datas.gname);
	$(document).on('click','li#admin-info-href',function(){
		admin_edit('管理员编辑','admin-setpassword.html',data.datas.admin_id,'40%','35%');
	})
	$("#logininfo").html('<span class="mr-15">登录次数：'+data.datas.admin_login_num+'</span><span class="mr-15">上次登录时间：'+data.datas.admin_last_login_time+'</span><span class="mr-15">上次登录ip：'+data.datas.admin_login_ip+'</span>');	
})

// 清除缓存按钮
$(document).on('click','li#clearcookies',function(){
	if($(this).attr('_href')){
		var bStop=false;
		var bStopIndex=0;
		var _href=$(this).attr('_href');
		var _titleName=$(this).attr("data-title");
		var topWindow=$(document);
		var show_navLi=topWindow.find("#min_title_list li");
		show_navLi.each(function() {
			if($(this).find('span').attr("data-href")==_href){
				bStop=true;
				bStopIndex=show_navLi.index($(this));
				return false;
			}
		});
		if(!bStop){
			creatIframe(_href,_titleName);
			min_titleList();
		}
		else{
			show_navLi.removeClass("active").eq(bStopIndex).addClass("active");
			var iframe_box=topWindow.find("#iframe_box");
			iframe_box.find(".show_iframe").hide().eq(bStopIndex).show().find("iframe").attr("src",_href);
		}
	}
})



//屏幕F5刷新
$(document).on('keydown',function(event){
	event.preventDefault();
    if(event.keyCode=='116'){
        event.keyCode = 0; 
        event.cancelBubble = true; 
        var url=$("#iframe_box").find(".show_iframe:visible").find("iframe").attr("src");      
        $("#iframe_box").find(".show_iframe:visible").find("iframe").attr("src",url);
        $("#iframe_box").find(".show_iframe:visible").find("iframe").focus();
    }   	
})




</script>
</body>
</html>